package com.lebang.mapper;

import com.lebang.configuration.datasource.DataSource;
import com.lebang.domain.EmailAuthority;
import com.lebang.example.EmailAuthorityExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * EmailAuthorityMapper继承基类
 */
@Mapper
public interface EmailAuthorityMapper extends MyBatisBaseDao<EmailAuthority, Integer, EmailAuthorityExample> {
    @DataSource("commonDB")
    List<Integer> selectByEmailId(@Param("emailId") Integer emailId);
    @DataSource("commonDB")
    EmailAuthority selectByIdAndAppId(@Param("emailId") Integer id,@Param("appId") Integer appId);
    @DataSource("commonDB")
    int updateRecord(@Param("id") Integer id,@Param("hasDeleted") Integer hadDeleted);
    @DataSource("commonDB")
    int add(@Param("emailId") Integer id,@Param("appId") Integer appId);
    @DataSource("commonDB")
    int deleteByEmailId(@Param("emailId") Integer emailId);
}